/*
 * CppTokenListManager.c
 *
 *  Created on: 2012/04/28
 *      Author: guanxiaoying
 */
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
#include <ctype.h>
#include <string.h>
#include <float.h>
#include "../coredef.h"

static AST gblCurrPPToken = 0;
static AST gblTranslationUnit = 0;

VOID  CppResultResetTokenList( AST astTranslationUnit ){
	gblTranslationUnit = astTranslationUnit;
	stCorePPTokenListAccess.clear();
}
AST  CppResultGetFirstPPToken( AST astTranslationUnit ){
	if( 0 < stCorePPTokenListAccess.getMax() ){
		gblCurrPPToken = MIN_ARRAY;
	}else{
		gblCurrPPToken = 0;
	}
	return 0;
}
AST CppResultGetCurrPPToken( VOID ){
	return gblCurrPPToken;
}
AST CppResultGetNextPPToken( VOID ){
	if( gblCurrPPToken < stCorePPTokenListAccess.getMax() ){
		gblCurrPPToken++;
	}else{
		gblCurrPPToken = 0;
	}
	return gblCurrPPToken;
}


